package cn.com.dbappsecurity.service.impl;

import java.util.List;

import cn.com.dbappsecurity.dao.LogMapper;
import cn.com.dbappsecurity.entity.Log;
import cn.com.dbappsecurity.service.ILog;

public class LogImpl extends BaseServiceImpl implements ILog{

	private LogMapper logMapper = getMapper(LogMapper.class);

	@Override
	public List<Log> search(String dateFrom, String dateTo, Integer status,
			String username, String ip, String event, int page, int rows,
			String sort, String order) throws Exception {
		return logMapper.search(dateFrom, dateTo, status, username, ip, event, getLimit(page,rows), rows, sort, order);
	}

	@Override
	public int searchCount(String dateFrom, String dateTo, Integer status,
			String username, String ip, String event) throws Exception {
		return logMapper.searchCount(dateFrom, dateTo, status, username, ip, event);
	}
	
}
